import React, { useState } from "react";
function AudioControls2() {
	let [controls, setControls] = useState({
		音量: 0,
		低音: 98,
		中音: 20,
		高音: 11,
	});
	return (
		<div>
			{Object.keys(controls).map((key) => (
				<div>
					<button
						onClick={() => {
							let value = controls[key];
							value = value - 1 < 0 ? 0 : value - 1;
							setControls({ ...controls, [key]: value });
						}}>
						-
					</button>
					{key}:{controls[key]}
					<button
						onClick={() => {
							let value = controls[key];
							value = value + 1 > 100 ? 100 : value + 1;
							setControls({ ...controls, [key]: value });
						}}>
						+
					</button>
				</div>
			))}
		</div>
	);
}
export default AudioControls2;
